<%@ taglib prefix="s" uri="/struts-tags"%>

<s:form action="admin/updateDurationDiscount.htm" theme="simple" method="post">
	<table>
		<tr>
        	<td height="40" class="sectionheading bottom-border">Duration Discount</td>
		</tr>
		<tr>
			<td valign="top" class="verdana12blacknormal">
				Please enter the discount for "ads", "fixed price", "shop" and
				"wanted items" types. Use only digits and the decimal point or
				comma.
				<br>
				<br>
			</td>
		</tr>
		<tr>
			<td valign="top" width="100%">
				<table width="100%" border="0" cellpadding="0" cellspacing="0" class="Textfiled-border">
					<tbody>
						<tr align="center" height="25">
							<td align="center" bgcolor="#E9E9E9" class="right-border verdana12darkgreybold">
								&nbsp;
								#&nbsp;
							</td>
							<td align="center" bgcolor="#E9E9E9" class="right-border verdana12darkgreybold">
								Discount
							</td>
							<td align="center" bgcolor="#E9E9E9" class="right-border verdana12darkgreybold">
								Fixed Price
							</td>

							<td align="center" bgcolor="#E9E9E9" class="right-border verdana12darkgreybold">
								Shop
							</td>
							<td align="center" bgcolor="#E9E9E9" class="right-border verdana12darkgreybold">
								Wanted
							</td>
							<td align="center" bgcolor="#E9E9E9" class="right-border verdana12darkgreybold">
								Advertisement
							</td>
							<td align="center" bgcolor="#E9E9E9" class="verdana12darkgreybold">
								Company Profile
							</td>
						</tr>

					<s:iterator value="durationDiscountList" status="rowstatus">
						<s:hidden name="durationDiscountMap[%{id}].id" value="%{id}" />
						<s:set name="classCSS" value="%{'Textfiled-no-border-odd'}" var="classCSS"></s:set>
						<s:set name="bgColor" value="%{'#FFFFFF'}" var="bgColor"></s:set>

						<s:if test="#rowstatus.even">
							<s:set var="classCSS" value="%{'Textfiled-no-border-even'}"></s:set>
							<s:set var="bgColor" value="%{'#F8F8F8'}"></s:set>
						</s:if>

						<tr>
							<td align="center" class="verdana12Greybold right-border" bgcolor="<s:property value="%{bgColor}" />">
								&nbsp;
								<s:text name="%{#rowstatus.index + 1}" />&nbsp;
							</td>
							<td align="left" class="verdana12Greybold right-border" bgcolor="<s:property value="%{bgColor}" />">
								<s:text name="%{discount}" /><s:hidden name="durationDiscountMap[%{id}].discount" value="%{discount}" />
							</td>
							<td align="center" class="verdana12Greybold right-border" bgcolor="<s:property value="%{bgColor}" />">
								<s:textfield theme="simple" cssClass="%{classCSS}" name="durationDiscountMap[%{id}].fixedPrice" value="%{fixedPrice}" size="5" />
								%
							</td>
							<td align="center" class="verdana12Greybold right-border" bgcolor="<s:property value="%{bgColor}" />">
								<s:textfield theme="simple" cssClass="%{classCSS}" name="durationDiscountMap[%{id}].shop" value="%{shop}" size="5" />
								%
							</td>
							<td align="center" class="verdana12Greybold right-border" bgcolor="<s:property value="%{bgColor}" />">
								<s:textfield theme="simple" cssClass="%{classCSS}" name="durationDiscountMap[%{id}].wanted" value="%{wanted}" size="5" />
								%
							</td>

							<td align="center" class="verdana12Greybold right-border" bgcolor="<s:property value="%{bgColor}" />">
								<s:textfield theme="simple" cssClass="%{classCSS}" name="durationDiscountMap[%{id}].advertisement" value="%{advertisement}" size="5" />
								%
							</td>
							<td align="center" class="verdana12Greybold" bgcolor="<s:property value="%{bgColor}" />">
								<s:textfield theme="simple" cssClass="%{classCSS}" name="durationDiscountMap[%{id}].companyProfile" value="%{companyProfile}" size="5" />
								%
							</td>
						</tr>

					</s:iterator>

					</tbody>
				</table>
			</td>

		</tr>
		<tr>
			<td align="center" width="100%">
				<s:submit theme="simple" type="image" src="../Admin-Images/save-chagnes-button.gif" value="Save Changes" />
				<input type="image" src="../Admin-Images/reset-button.gif" value="Reset" onclick="this.form.reset();">
				<img onclick="history.go(-1);" src="../Admin-Images/cancel_btn.gif" alt="Cancel">
			</td>
		</tr>
	</table>
</s:form>